<%-- 
    Document   : PesanStokCabang
    Created on : 01-Dec-2013, 22:06:53
    Author     : Yohanes Beny P
--%>

<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="Bean.CekStokBarangPusat"%>
<%@page import="Bean.CekStokBarangCabang"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Pesan Stok Cabang Frogstone</title>
        <link href="../css/style_web.css" rel="stylesheet" type="text/css"/>
    </head>
    <body id="home"> 
        <%
            Cookie[] ck = request.getCookies();
            Bean.CekStokBarangCabang cb = new CekStokBarangCabang();
            String nama = cb.tampilNamaCabang(ck[1].getValue());
            Bean.CekStokBarangPusat cp = new CekStokBarangPusat();
            ResultSet rs = cp.tampilStokPusat();
            SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
            SimpleDateFormat sdf1 = new SimpleDateFormat("ddMMyyyy");
            Date d = new Date();
            String date = sdf.format(d);
            String finalDate = sdf1.format(d);
        %>
        <div id="wrapper">
            <div id="header">
                <div id="site_title">
                    <a href="#"></a>
                </div>
                <div id="header_kanan">
                    <div id="mu_logout">
                        <form action="../MenuUtamaCabang.jsp"><input type="submit" value="" name="menu_utama" class="menuUtama"/></form>
                        <form action="../FilterLogout"><input type="submit" value="" name="logout" class="logout"/></form>
                    </div>
                </div>
                <div id="content">
                    <center>
                        <h2><b><font color="black" face="Verdana">PESAN STOK BARANG KANTOR CABANG</font></b></h2></br>
                        <form action="../PesanStokCabang">
                            <table>
                                <tr>
                                    <td><h3>ID Cabang</h3></td>
                                    <td width="5"></td>
                                    <td><%=ck[1].getValue()%></td>
                                </tr>
                                <tr>
                                    <td><h3>Nama Cabang</h3></td>
                                    <td width="5"></td>
                                    <td><%=nama%></td>
                                </tr>
                                <tr>
                                    <td><h3>Tanggal Pesan Barang</h3></td>
                                    <td width="5"></td>
                                    <td><input type="hidden" name="date_brg" value=<%=finalDate%> /><%=date%></td>
                                </tr>
                                <tr>
                                    <td><h3>Barang</h3></td>
                                    <td width="5"></td>
                                    <td><select name="kode_brg" class="field1">
                                            <%
                                                while (rs.next()) {
                                                    out.print("<option value='" + rs.getString("KODEBARANG") + "' selected=''>"
                                                            + rs.getString("NAMABARANG") + " _______stok: " + rs.getString("JUMLAHBARANG") + "</option>");
                                                }
                                            %>
                                        </select></td>
                                </tr>
                                <tr>
                                    <td><h3>Jumlah Pesan</h3></td>
                                    <td width="5"></td>
                                    <td><input type="text" name="jmlh_brg" class="field3"/></td>
                                </tr>
                                <tr>
                                    <td align="center"><input type="submit" name="submit" value="PESAN"/></td>
                                    <td align="center"></td>
                                    </form>
                                    <td align="center"><form action="../Cabang/PesanStokCabang.jsp"><input type="submit" name="submit" value="RESET"/></form></td>
                                </tr>
                            </table>
                    </center>
                </div>
            </div>
        </div>
    </body>
</html>

